Repository navigation
feat(orchestration): record the workflow phase a swarm was started from - #213
Merged
trvon merged 1 commit intoNov 20, 2026
Merged
Conversation
Phased work is a workflow whose states each run a swarm, but nothing tied a swarm to its phase, so progress views showed two unrelated controllers. A batch created while its session holds a live claim on exactly one active workflow now records that workflow, execution and state, and the create result names it. The link is display metadata. No claim, an expired claim, a paused workflow or several claims leave the batch unlinked, and the link is never consulted for dispatch, admission or transitions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Classification
Feature expectation. Phased fan-out is a workflow whose states each run a swarm; nothing tied a swarm to the phase it was started from.
Contract
phase: workflow id, execution id and state name. The execution id distinguishes visits to a state re-entered on rework.Phase: workflow #N · state.Invariants
phasestill loads; a malformed link is rejected as corrupt (K3).AGENTS.mdanddocs/REFERENCE.mdstate that the link never affects dispatch, admission or transitions.Evidence
Red on unchanged source: K1 and K3 failed (
expected undefined to deeply equal { workflowId: '4', … }); the K2 controls passed.Green:
npm run lint,npm run typecheck,npm test(1619 passed),npm run build,npm run test:package,git diff --check, all by exit code.Limitations
WorkflowClaim. A second swarm started in the same phase after the claim lapses is not linked.